﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<KLS.PPDS.Web.Models.ArticleContentViewModel>" %>
<%@ Import Namespace="KLS.PPDS.Resources" %>
<%@ Import Namespace="KLS.PPDS.Utility.Html" %>
<%@ Import Namespace="KLS.PPDS.Utility" %>
<tr>
   <%-- <td>
        <label for="img_<%:Model.Id%>">
            <%:CommonString.UploadImage %></label>
    </td>--%>
    <td>

            <%
            
          var img = String.IsNullOrEmpty(Model.ImageFileError).Equals(true) ? string.Empty : "error";          
          var imgFile = Model.IsGraphicsDisable.Equals(false) ? "" : "disabled";
          var pubId = Model.PublicationId;
          var artId = Model.ArticleId;
          var comId = Model.CompanyId;
          var contentId = Model.Id;
          
        %>

        <div class="image-upload-lable">
                    <label for="img_<%:Model.Id%>">
                    <%:CommonString.UploadImage %></label>                
        </div>
        
    

      
        <div class="image-upload-wrapper">   
          
             <div class="image-button-text-wrapper">                           
                <%:CommonString.UploadImage%>             
            </div>     
          
            <div class="image-button-wrapper">
                <input type="file" multiple="" fileindex="<%:Model.Id%>" name="img_<%:Model.Id%>" comId="<%:comId%>" pubId="<%:pubId%>" artId="<%:artId%>" contentId="<%:contentId%>" class="image-upload <%:img%> clear-error" ID= "img_<%:Model.Id%>" <%:imgFile %>  />
            </div>                                      
        </div>
        <%if (!String.IsNullOrEmpty(img))
          {%>
        <label for="img_<%:Model.Id%>" generated="true" class="error">
            <%=Model.ImageFileError%>
        </label>
        <%
            } %>
    </td>
</tr>
